<div class="box_right">
	<h1>结算查询</h1>
	<p class="note">每日10：00前完成数据更新，当前数据更新至<?php echo date("Y-m-d",strtotime("-1 day")); ?></p>
	<div class="pro_box">
		<div class="layui-form-item">
		  <div class="layui-inline">
		  	<form class="layui-form" action="<?php echo base_url().'gasstation/order/jiesuan'?>" method="get">
			    <label class="layui-form-label" style="width: 110px;">结算日期</label>
			    <div class="layui-input-inline" style="width: 200px;">
			    	<input type="text" name="date1" class="layui-input" id="test5" placeholder="年-月-日" value="<?php if (isset($date1))echo $date1;?>">
			    </div>
			    <div class="layui-form-mid">到</div>
			    <div class="layui-input-inline" style="width: 200px;">
			    	<input type="text" name="date2" class="layui-input" id="test6" placeholder="年-月-日" value="<?php if (isset($date2))echo $date2;?>">
			    </div>
			    <p class="say">单次查询日期的最长跨度为31天</p>
			  </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="btn_tj">查询</button>
			    </div>
			  </div>
		  </form>
		  <div class="order_list">
		  	<div class="layui-row">
		  		<div class="layui-col-xs4">
		  			<h2 class="order_list_h">订单列表</h2>
		  		</div>
		  		<!--<div class="layui-col-xs1 layui-col-xs-offset7">
		  			<button class="btn_get">导出</button>
		  		</div>-->
		  	</div>
		  		
			<table class="layui-table ct" lay-skin="line">

			  <thead>
			    <tr >
			      <th>结算日期</th>
			      <th>订单金额(机显)</th>
			      <th>营销费用</th>
                  <th>优惠券费用</th>
			      <th>折后金额</th>
			      <th>服务费</th>
			      <th>转账<br/>金额（元）</th>
			      <th>自动<br/>提现状态</th>
			      <th>操作</th>
			    </tr> 
			  </thead>
			  <tbody>
			  	<?php if (isset($result)&&count($result)>0){
					foreach ($result as $app){
				?>
			    <tr>
			      <td><?php echo substr($app->time,0,10);?></td>
			      <td><?php echo $app->order_price;?></td>
			      <td><?php echo $app->yx_price;?></td>
                  <td><?php echo $app->coupon_price;?></td>
			      <td><?php echo $app->zhe_price;?></td>
			      <td><?php echo $app->service_price;?></td>
			      <td><?php echo $app->real_price;?></td>
			      <td>
			      	<?php if($app->type == 1){ ?>
			      	<a href="javascript:;" class="check">提现成功</a>
			      	<?php }elseif($app->type == 0){ ?>
			      	<a href="javascript:;" class="check" style="color:red">未提现</a>
			      	<?php } ?>
			      </td>
			      <td>
			      	<a class="get" href="<?php echo base_url().'gasstation/order/settlement_up_execl/'.$gasstation_id.'/'.substr($app->time,0,10);?>">导出结算单</a>
			      	<a  class="get" href="<?php echo base_url().'gasstation/order/print_up/'.$app->id?>">打印</a>
			      </td>
			    </tr>
				<?php }
					}else{?>
					<tr>
						<td colspan="7">无数据</td>
					</tr>
				<?php }?>
			  </tbody>
			</table>
		  </div> 
	</div>
</div>
<script>
//Demo
layui.use(['form','element','laydate'], function(){
  var form = layui.form,
  	element = layui.element,
  	laydate = layui.laydate;

  //时间选择器
  laydate.render({
    elem: '#test5'
  });
    //时间选择器
  laydate.render({
    elem: '#test6'
  }); 
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});
</script>	